<template>
    <div class="table">
        <el-table :data="$store.getters['member/getMember']" border style="width: 100%">
            <el-table-column prop="id" label="用户编号" width="180">
            </el-table-column>
            <el-table-column prop="nickname" label="昵称" width="180">
            </el-table-column>
            <el-table-column prop="phone" label="手机号" width="180">
            </el-table-column>
            <el-table-column  label="状态">
                <template slot-scope="item">
                    <div>
                        <el-button type="primary" plain size="mini">{{item.row.status == 1 ? '启用' : '禁用'}}</el-button>
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="item">
                    <div>
                        <el-button type="primary" plain size="mini" @click="edit(item.row.uid)">编辑</el-button>
                    </div>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>
<script>
export default {
    data() {
        return {
            
        }
    },
    methods: {
        edit(uid){
            this.$emit('edit',uid)
        }
    },
    mounted() {
        console.log(this.$store);
        this.$store.dispatch('member/GetMemberInfo')
     },
    watch: {},
    computed: {},
    filters: {},
    components: {}
}
</script>
<style scoped>
.table {
    margin: 20px;
}
</style>